package com.tanhua.dubbo.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.model.db.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


/**
 * @auther : 白月尘
 * @date : 9:59  2021/10/17
 */
public interface UserInfoMapper extends BaseMapper<UserInfo> {
    /**
     * SELECT * FROM tb_user_info WHERE id in(SELECT black_user_id FROM tb_black_list where user_id= 106)
     * @return
     */
    @Select("SELECT * FROM tb_user_info WHERE id" +
            " in(SELECT black_user_id FROM tb_black_list where user_id= #{userId})")
    IPage<UserInfo> findBlackList(@Param("page")Page page,@Param("userId") long userId);

}
